package xishuiwanglearning.testdemo;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import xishuiwanglearning.DI;

public class testspring2 {
    public static void main(String[] args) {
//        加载spring配置文件
        ApplicationContext context =new ClassPathXmlApplicationContext("bean2.xml");
//        获取配置创建的对象
        DI put = context.getBean("di", DI.class);


         put.output();


    }


}


